<template>
	<view class="home">
		<view class="swiper-view">
			<u-swiper
				:list="swiperList"
			></u-swiper>
		</view>
	
		<Activity :newsPanelHeight="newsPanelHeight"></Activity>
		<v-tabbar :tabbarIndex="0"></v-tabbar>
	</view>
</template>

<script>
import Activity from './components/activity.vue'

export default {
	components:{
		Activity
	},
	data() {
		return {
			
			newsPanelHeight: 0,
			swiperList: [
				'https://cdn.uviewui.com/uview/swiper/swiper1.png',
				'https://cdn.uviewui.com/uview/swiper/swiper2.png',
				'https://cdn.uviewui.com/uview/swiper/swiper3.png',
            ]
		
		}
	},
	methods: {
	
	},
	onReady(){
		let _this = this;

		uni.getSystemInfo({
		    success: function (res) {
				uni.createSelectorQuery().select('.swiper-view').boundingClientRect(data => {
					console.log(data.height)
					_this.newsPanelHeight = res.windowHeight - data.height
				}).exec()
		    }
		});
	},
	onLoad() {

	},
}
</script>

<style lang="scss" scoped>
.home{
	padding: $contentPading;
	background: $uni-bg-color-grey;
	height: 100vh;
	box-sizing: border-box;
	overflow: hidden;
}
	
</style>
